package com.elong.qadev.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
/**
 * 
* @ClassName: CaseNode
* @Description: TODO(界面左侧用例节点对应model)
* @author kangchen
* @date 2015年10月2日
*
 */
@Entity
@Table(name = "CASENODE", schema = "ti")
public class CaseNode {
    public CaseNode(int id, String name, String pId, boolean isParent,
			boolean open, String caseType, String remarks) {
		super();
		this.id = id;
		this.name = name;
		this.pId = pId;
		this.isParent = isParent;
		this.open = open;
		this.caseType = caseType;
		this.remarks = remarks;
	}

	public CaseNode() {
		super();
	}   
    
	private int id;
    private String name;
    private String pId;    
    private boolean isParent;
    private boolean open;
    private String caseType;
    private String remarks;
    
    @Column(name = "REMARKS",nullable = true, length = 150)
    public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	
	@Column(name = "CASETYPE",nullable = true, length = 50)
	public String getCaseType() {
		return caseType;
	}

	public void setCaseType(String caseType) {
		this.caseType = caseType;
	}
     
    @Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "ID", unique = true, nullable = false, length = 10)
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    @Column(name = "NAME",nullable = false, length = 100)
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
   
   
    @Override
	public String toString() {
		return "CaseNode [id=" + id + ", name=" + name + ", pId="
				+ pId + ", isParent=" + isParent + ", open=" + open
				+ ", caseType=" + caseType + ", remarks=" + remarks + "]";
	}

	
    @Column(name = "PID",nullable = false, length = 100)
    public String getpId() {
		return pId;
	}

	public void setpId(String pId) {
		this.pId = pId;
	}
	@Column(name = "ISPARENT",nullable = false)
    @org.hibernate.annotations.Type(type="yes_no")
	public boolean isIsParent() {
		return isParent;
	}

	public void setIsParent(boolean isParent) {
		this.isParent = isParent;
	}

	@Column(name = "ISOPEN",nullable = false)
    @org.hibernate.annotations.Type(type="yes_no")
    public boolean isOpen() {
        return open;
    }
 
    public void setOpen(boolean open) {
        this.open = open;
    }
     
}